package com.itheima.controller;

import com.itheima.pojo.OperateLog;
import com.itheima.pojo.OperateLogQueryParam;
import com.itheima.pojo.PageBean;
import com.itheima.service.OperateLogService;
import com.itheima.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/log")
public class OperateLogController {

    @Autowired
    private OperateLogService operateLogService;

    /**
     * 日志列表查询
     *
     * @param page
     * @return
     */
    @GetMapping("/page")
    public Result findOperateLogPage(OperateLogQueryParam page) {
        PageBean list = operateLogService.findOperateLogPage(page);
        return Result.success(list);
    }

}
